<div class="tms-main-page-function">
    <div class="main-content">
        <div class="page-function">
            <ul class="wms-wbm-fun-left">
                <button class="layui-btn" ng-click="export()">导出</button>
                <a class="layui-btn" id="islExport" ng-href='{{excelUrl}}' ng-show="false"></a>
                <button class="layui-btn" ng-click="freezen()"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">冻结
                </button>
                <button class="layui-btn" ng-click="thaw()"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">解冻
                </button>
                <button class="layui-btn" ng-click="openChangeLocCode()"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">更换库位
                </button>
            </ul>
            <div class="wms-wbm-fun-right">
                <input type="text" placeholder="车架号-->回车查询" ng-model="search.invlocVin"
                       ng-keydown="searchListKeyDown($event)" class="search-input">
                <button class="layui-btn" ng-click="moreClick()">更多</button>
                <i class="iconfont icon-shuaxin layui-anim layui-anim-loop layui-anim-rotate wms-refresh"
                   ng-click="refreshClick()" refresh></i>
            </div>
        </div>

        <div class="otherForm" style="width: 96%" ng-show="otherForm">
            <ul>
                <li>
                    <div class="otherFormItem">
                        <div>货主</div>
                        <div>
                            <ui-select ng-model="dropDownDefault.shipper">
                                <ui-select-match>
                                    <span ng-bind="$select.selected.wnhCustomerName"></span>
                                </ui-select-match>
                                <ui-select-choices repeat="shipper in (dropDownList.shipper | filter: $select.search)">
                                    <span ng-bind="shipper.wnhCustomerName"></span>
                                </ui-select-choices>
                                <ui-select-no-choice>
                                    没有加载到数据
                                </ui-select-no-choice>
                            </ui-select>
                        </div>
                    </div>
                    <!--<div class="otherFormItem" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">
                        <div>仓库</div>
                        <div>
                            <ui-select ng-model="dropDownDefault.warehouse">
                                <ui-select-match>
                                    <span ng-bind="$select.selected.whName" ></span>
                                </ui-select-match>
                                <ui-select-choices repeat="warehouse in dropDownList.warehouse">
                                    <span ng-bind="warehouse.whName"></span>
                                </ui-select-choices>
                                <ui-select-no-choice>
                                    没有加载到数据
                                </ui-select-no-choice>
                            </ui-select>
                        </div>
                    </div>-->
                    <div class="otherFormItem">
                        <div>车型</div>
                        <div>
                            <ui-select ng-model="dropDownDefault.vehicleSpec">
                                <ui-select-match>
                                    <span ng-bind="$select.selected.wndVehicleName"></span>
                                </ui-select-match>
                                <ui-select-choices
                                        repeat="vehicleSpec in (dropDownList.vehicleSpec | filter: $select.search)">
                                    <span ng-bind="vehicleSpec.wndVehicleName"></span>
                                </ui-select-choices>
                                <ui-select-no-choice>
                                    没有加载到数据
                                </ui-select-no-choice>
                            </ui-select>
                        </div>
                    </div>

                    <div class="otherFormItem"
                         ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) === -1">
                        <div>库存状态</div>
                        <div>
                            <ui-select ng-model="dropDownDefault.invStatus">
                                <ui-select-match>
                                    <span ng-bind="$select.selected.name"></span>
                                </ui-select-match>
                                <ui-select-choices repeat="item in dropDownList.invStatus">
                                    <span ng-bind="item.name"></span>
                                </ui-select-choices>
                                <ui-select-no-choice>
                                    没有加载到数据
                                </ui-select-no-choice>
                            </ui-select>
                        </div>
                    </div>


                </li>
                <li>
                    <div class="otherFormItem" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">
                        <div>物料名称</div>
                        <div>
                            <input ng-model="search.materialName" class="layui-input" type="text"/>
                        </div>
                    </div>

                    <div class="otherFormItem" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">
                        <div>物料编码</div>
                        <div>
                            <input ng-model="search.materialCode" class="layui-input" type="text"/>
                        </div>
                    </div>

                    <div class="otherFormItem" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">
                        <div>颜色名称</div>
                        <div>
                            <input ng-model="search.colourName" class="layui-input" type="text"/>
                        </div>
                    </div>
                    <div class="otherFormItem" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">
                        <div>库龄</div>
                        <div>
                            <input ng-model="search.inventoryAge" class="layui-input" type="text"/>
                        </div>
                    </div>

                </li>
                <li>
                    <div class="otherFormItem otherFormItemButton">
                        <button class="layui-btn" ng-click="searchClick()">查询</button>
                        <button class="layui-btn" ng-click="resetClick()">重置</button>
                    </div>
                </li>
            </ul>
        </div>

        <div class="layui-form scrollTable">
            <table class="layui-table wms_wbm_main_table minScreen"
                   ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">
                <tbody>
                <tr>
                    <th>序号</th>
                    <th>货主</th>
                    <th>车架号(VIN号)</th>
                    <th>库区</th>
                    <th>库位</th>
                    <th>仓库代码</th>
                    <th>仓库名称</th>
                    <th>车型</th>
                    <th>车型描述</th>
                </tr>
                <tr ng-repeat="inventorySelect in inventorySelectList">
                    <td ng-bind="$index+1"></td>
                    <td ng-bind="inventorySelect.invCustomerName"></td>
                    <td ng-bind="inventorySelect.invlocVin"></td>
                    <td ng-bind="inventorySelect.invlocZoneName"></td>
                    <td ng-bind="inventorySelect.invlocLocCode"></td>
                    <td ng-bind="inventorySelect.invWhCode"></td>
                    <td ng-bind="inventorySelect.invWhName"></td>
                    <td ng-bind="inventorySelect.invVehicleSpecName"></td>
                    <td ng-bind="inventorySelect.invVehicleSpecDesc"></td>
                </tr>
                </tbody>
            </table>
            <table class="layui-table wms_wbm_inventory_select wms_wbm_main_table minScreen"
                   ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">
                <tbody>
                <tr>
                    <th>
                        <input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose">
                        <div class="layui-unselect layui-form-checkbox" lay-skin="primary">
                            <i class="layui-icon"></i>
                        </div>
                    </th>
                    <th>序号</th>
                    <th>货主</th>
                    <th>车架号(VIN号)</th>
                    <th>车型</th>
                    <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) === -1">物料代码</th>
                    <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) === -1">物料名称</th>
                    <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) === -1">颜色代码</th>
                    <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) === -1">颜色名称</th>
                    <th>生产日期</th>
                    <th>下线日期</th>
                    <th>入库日期</th>
                    <th>在库库龄</th>
                    <th>库存状态</th>
                    <th>库区</th>
                    <th>库位</th>
                    <th>仓库代码</th>
                    <th>仓库名称</th>
                    <!--<th>车型描述</th>-->
                </tr>
                <tr ng-repeat="inventorySelect in inventorySelectList" ng-click="Tools.initTableClick($event)"
                    item="{{inventorySelect}}">
                    <td>
                        <input type="checkbox" name="ckValue" ng-value="$index" lay-skin="primary"/>
                        <div class="layui-unselect layui-form-checkbox" lay-skin="primary">
                            <i class="layui-icon"></i>
                        </div>
                    </td>
                    <td ng-bind="$index+1"></td>
                    <td ng-bind="inventorySelect.invCustomerName"></td>
                    <td ng-bind="inventorySelect.invlocVin"></td>
                    <td ng-bind="inventorySelect.invVehicleSpecName"></td>

                    <td ng-bind="inventorySelect.materialCode"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) === -1"></td>
                    <td ng-bind="inventorySelect.materialName"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) === -1"></td>
                    <td ng-bind="inventorySelect.colourCode"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) === -1"></td>
                    <td ng-bind="inventorySelect.colourName"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) === -1"></td>

                    <td ng-bind="inventorySelect.atProductionDate"></td>
                    <td ng-bind="inventorySelect.atOfflineDate"></td>
                    <td ng-bind="inventorySelect.gmtCreate"></td>
                    <td ng-bind="inventorySelect.warehouseAge"></td>
                    <td ng-bind="inventorySelect.status | inventoryStatusFilter"></td>
                    <td ng-bind="inventorySelect.invlocZoneName"></td>
                    <td ng-bind="inventorySelect.invlocLocCode"></td>
                    <td ng-bind="inventorySelect.invWhCode"></td>
                    <td ng-bind="inventorySelect.invWhName"></td>
                    <!--<td ng-bind="inventorySelect.invVehicleSpecDesc"></td>-->
                </tr>
                </tbody>
            </table>
        </div>
        <div class="admin-table-page" style="text-align: center;">
            <div id="pages" class="page">
            </div>
        </div>
    </div>
</div>